package org.springblade.mes.logistics.entry.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 数据模型
 * @author qp
 */
@Data
@Accessors(chain = true)
@TableName("e_warehouse_entry")
public class WarehouseEntry extends TenantEntity {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "createUserName")
	private String createUserName;

	@ApiModelProperty(value = "updateUserName")
	private String updateUserName;

	@ApiModelProperty(value = "目标库区类型")
	private String areaType;

	@ApiModelProperty(value = "目标库区Id")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long areaId;

	@ApiModelProperty(value = "入库单号")
	private String entryNo;

	@ApiModelProperty(value = "红字入库原入库单号")
	private String srcEntryNo;

	@ApiModelProperty(value = "入库类型:来料,来料让步接收,委外,委外让步接收,其它入库,备件入库")
	private String entryType;

	@ApiModelProperty(value = "单据状态ID")
	private String billStatusId;

	@ApiModelProperty(value = "单据状态文本,1.未入库2.已开入3.已入库完")
	private String billStatusText;

	@ApiModelProperty(value = "是否是手动创建的单据,0默认,自动,1手动")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Integer manually;

	@ApiModelProperty(value = "入库人Id")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long operatorUserId;

	@ApiModelProperty(value = "入库人名")
	private String operatorUserName;

	@ApiModelProperty(value = "开始入库时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date startTime;

	@ApiModelProperty(value = "结束入库时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date endTime;

	@ApiModelProperty(value = "质检备注")
	private String inspectRemark;

	@ApiModelProperty(value = "计划单号")
	private String planNo;

	@ApiModelProperty(value = "发货单号")
	private String sendNo;

	@ApiModelProperty(value = "清点单号")
	private String checkNo;

	@ApiModelProperty(value = "质检单号")
	private String inspectionNo;

	@ApiModelProperty(value = "关联单号(结余入库,完工入库)")
	private String relationDocNo;

	@ApiModelProperty(value = "业务类型ID")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long bizId;

	@ApiModelProperty(value = "业务编码")
	private String bizTypeCode;

	@ApiModelProperty(value = "业务描述")
	private String bizTypeName;

	@ApiModelProperty(value = "审核时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date examineTime;

	@ApiModelProperty(value = "审核人Id")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long examineUser;

	@ApiModelProperty(value = "审核人用户名")
	private String examineUserName;

	@ApiModelProperty(value = "供应商/加工商ID")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long relatedCompanyId;

	@ApiModelProperty(value = "供应商/加工商Code")
	private String relatedCompanyCode;

	@ApiModelProperty(value = "relatedCompanyName")
	private String relatedCompanyName;

	@ApiModelProperty(value = "备注")
	private String remark;

	@ApiModelProperty(value = "流程实例id")
	private String processInstanceId;

	@ApiModelProperty(value = "流程定义id")
	private String processDefinitionId;

	@ApiModelProperty(value = "auditUser")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long auditUser;

	@ApiModelProperty(value = "auditTime")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date auditTime;

	@ApiModelProperty(value = "auditUserName")
	private String auditUserName;

	@ApiModelProperty(value = "质检人Id")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long inspectUserId;

	@ApiModelProperty(value = "质检人名")
	private String inspectUserName;

	@ApiModelProperty(value = "采购订单号")
	private String purchaseOrderNo;

	@ApiModelProperty(value = "配给计划号")
	private String distributionPlanNo;

	@ApiModelProperty(value = "生产任务号,配给入库")
	private String productionTaskNo;

	@ApiModelProperty(value = "生产任务号,完工入库")
	private String productionTaskNoFinished;

	@ApiModelProperty(value = "生产任务是否完工,0:否,1:是")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Integer productionTaskFinished;

	@ApiModelProperty(value = "三方库所在公司Id")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long siteCompanyId;

	@ApiModelProperty(value = "辅料入库单状态")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Integer auxiliaryDocStatus;

	@ApiModelProperty(value = "供应商Id")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long supplierId;

	@ApiModelProperty(value = "供应商编号")
	private String supplierNo;

	@ApiModelProperty(value = "供应商名称")
	private String supplierName;

	@ApiModelProperty(value = "是否已同步到金蝶,默认0:否,1:是")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Integer toKd;

	@ApiModelProperty(value = "同步金蝶异常消息")
	private String toKdMsg;

	@ApiModelProperty(value = "销售单号")
	private String sellOrderNo;

	@ApiModelProperty(value = "销售合同号")
	private String sellContractNo;

	@ApiModelProperty(value = "库位ID")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long locId;

	@ApiModelProperty(value = "库位编码,备件用")
	private String locCode;

	@ApiModelProperty(value = "locName")
	private String locName;

	@ApiModelProperty(value = "项目编号")
	private String projectNo;

	@ApiModelProperty(value = "项目名称")
	private String projectName;

	@ApiModelProperty(value = "项目类型")
	private String projectType;

	@ApiModelProperty(value = "采购合同号")
	private String purchaseContractNo;

	@ApiModelProperty(value = "是否条码管理,0:否,1:是")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Integer isBarcode;

	@ApiModelProperty(value = "出库单号")
	private String outputNo;

	@ApiModelProperty(value = "归还人员姓名")
	private String returnPerson;

	@ApiModelProperty(value = "审批状态")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Integer billStatus;

	@ApiModelProperty(value = "物资借出单号(查询条件)")
	private String outputNoSearch;

	@ApiModelProperty(value = "领用人员ID(查询条件)")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Long relatedUser;

	@ApiModelProperty(value = "物资ID(查询条件)")
	private String materialIds;

	@ApiModelProperty(value = "出库时间开始(查询条件)")
	private String outputTimeBegin;

	@ApiModelProperty(value = "出库时间结束(查询条件)")
	private String outputTimeEnd;

	@ApiModelProperty(value = "是否已同步到账外库,0:默认,否,1:是")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Integer toOtherWarehouse;

	@ApiModelProperty(value = "账外库编码")
	private String toWarehouseCode;

	@ApiModelProperty(value = "客户名称")
	private String customerName;

	@ApiModelProperty(value = "鼎捷erp单号")
	private String erpNo;

	@ApiModelProperty(value = "pm2状态,1:保存,2:处理")
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	private Integer pm2Status;

}